<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>大卫杜夫 | 雪茄</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="shortcut icon" type="image/ico" href="http://davidoff.com/favicon.ico" />
	<link href="../static/css/reset.css" rel="stylesheet">
	<link href="../static/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
	<link href="../static/css/main.css" rel="stylesheet">
	<link href="../static/css/en.css" rel="stylesheet">
</head>

<body id="beautiful-time" class="beautiful-time guest chrome win closed">
	<div id="header"></div>
	<div id="wp">
	<script id="tpl" type="text/html">
		<div class="top-banner">
			<section class="kv"><%if(list.length>0){%>
				<a href="javascript:void(0)"><div style="background-image:url(<%:=list[0].IMG_URL%>)">&nbsp;</div></a>
				<%}%>
			</section>
		</div>
	<section class="masonry-feed">
			<div class="flagged">
			<div class="left">					
					<%for(var i = 0; i < 3; i++) {%>
						<%if(i<list.length){%>	
				<a href="../news/detail.html?NEWS_ID=<%:=list[i].NEWS_ID%>" class="<%if(i==0){%> item third <%}else{%> item single <%}%> " style="background-image: url(<%:=list[i].IMG_URL%>)">
					<div class="gradient"></div>
					<div class="hover"></div>
					<div class="content-wrapper">
						<h1><%:=list[i].NEWS_NAME%></h1>
						<h3><%if(list[i].NEWS_AUTHOR){%><%:=list[i].NEWS_AUTHOR%><%}%></h3>						
							<div class="teaser"><%if(list[i].NEWS_BRIEF){%><%:=list[i].NEWS_BRIEF%><%}%></div>
					</div>
					<%if(list[i].NEWS_LABEL){%>
					<div class="category">
							<%:=list[i].NEWS_LABEL%>
					</div>
					<%}%>
				</a>
				<%}%>
				<%}%>
			</div>

			<div class="right">
					<%if(list.length>3){%>
						<a href="../news/detail.html?NEWS_ID=<%:=list[i].NEWS_ID%>"" class="item double-height" style="background-image: url(<%:=list[3].IMG_URL%>)">
							<div class="gradient"></div>
							<div class="hover"></div>
							<div class="content-wrapper">
								<h1><%:=list[3].NEWS_NAME%></h1>
								<h3><%if(list[3].NEWS_AUTHOR){%><%:=list[3].NEWS_AUTHOR%><%}%></h3>						
							<div class="teaser"><%if(list[3].NEWS_BRIEF){%><%:=list[3].NEWS_BRIEF%><%}%></div>
							</div>
							<%if(list[3].NEWS_LABEL){%>
							<div class="category">
									<%:=list[3].NEWS_LABEL%>
							</div>
							<%}%>
						</a>
				<%}%>
			</div>

		</div>
		<div class="group">
				<%for(var j = 4; j <list.length; j++) {%>
						<%var itemClass="";%>
						<%if((j-4)%6==0){%>
						<%itemClass="whole"%>
						<%}%>
						<%if((j-4)%6==1 || (j-4)%6==2){%>
							<%itemClass="single"%>
						<%}%>
						<%if((j-4)%6==3){%>
							<%itemClass="single break"%>
							<%}%>
							<%if((j-4)%6==4){%>
								<%itemClass="half"%>
								<%}%>
								<%if((j-4)%6==5){%>
									<%itemClass="half break"%>
									<%}%>
				<a href="../news/detail.html?NEWS_ID=<%:=list[j].NEWS_ID%>"" class="item <%:=itemClass%>" style="background-image: url(<%:=list[j].IMG_URL%>)">
						<div class="gradient"></div>
						<div class="hover"></div>
						<div class="content-wrapper">
							<h1><%:=list[j].NEWS_NAME%></h1>
							<h3><%if(list[j].NEWS_AUTHOR){%><%:=list[j].NEWS_AUTHOR%><%}%></h3>						
							<div class="teaser"><%if(list[j].NEWS_BRIEF){%><%:=list[j].NEWS_BRIEF%><%}%></div>
						</div>
						<%if(list[j].NEWS_LABEL){%>
						<div class="category">
								<%:=list[j].NEWS_LABEL%>
						</div>
						<%}%>
					</a>
					<%}%>
		</div>
	</section>

</script>
</div>
	<!--footer start  -->
	<div id="footer"></div>
	<!--footer end  -->
	<script type="text/javascript" src="../static/lib/fancyBox-2.1.5/lib/jquery-1.10.1.min.js"></script>
	<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
	<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
	<script src="../static/lib/bootstrap/dist/js/bootstrap.min.js"></script>
	<script src="../static/js/common.js"></script>
	<script src="../static/js/template.js"></script>
	<style>
		html {
			font-size: 14px;
		}
	</style>
	<script>
		//获取美好时光新闻列表
		var NewsList = []
		$(function () {
			let prdParams= {
				"cmd": "news.list.get",
				"param": {
					"KEY_WORD": "动态",
					"PAGE_INDEX": 1,
					"PAGE_SIZE": 1000
				}
			}
			$.ajax({
				type: "POST",
				url: "http://davidoff.gemdesign.cn/CMS/api/CMS",
				contentType: "application/json; charset=utf-8",
				data: JSON.stringify(prdParams),
				dataType: "json",
				success: function (data) {
				NewsList = data.NewsList
				var tpl = document.getElementById('tpl').innerHTML;
				var html = template(tpl, {
					list: NewsList
				});
				document.getElementById('wp').innerHTML = html;
				},
				error: function (message) {
					alert(message)
				}
			});
		})

	</script>
	<script>
		$(function () {
			$('.masonry-feed .content-wrapper').each(function () {
				var teaser = $('.teaser', this)
				$(this).css({
					bottom: -teaser.height() - 8
				})
			})
		})
	</script>
</body>

</html>
